package com.woniuxy.depot.service.impl;

import com.woniuxy.depot.mapper.DepotInStockItemMapper;
import com.woniuxy.depot.model.entity.DepotInStockItem;
import com.woniuxy.depot.service.DepotInStockItemService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DepotInStockItemServiceImpl implements DepotInStockItemService {
    @Resource
    private DepotInStockItemMapper itemMapper;
    @Override
    public List<Integer> getInStockIdsByCode(String code) {
        return itemMapper.getInStockIdsByCode(code);
    }

    @Override
    public void insert(List<DepotInStockItem> items) {
        for (DepotInStockItem item:items) {
            itemMapper.insert(item);
        }
    }
}
